<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
	<title>用户列表</title>
	<style>.size{width:180px;height:200px;}</style>
	<link href="/study/Public/bootstrap/css/bootstrap.min.css" rel="stylesheet">
	<link rel="stylesheet" href="/study/Public/bootstrap/css/bootstrap-theme.min.css">
    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="/study/Public/bootstrap/js/jquery.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="/study/Public/bootstrap/js/bootstrap.min.js"></script>
	
</head>
<body>
<h1>新闻动态管理页面</h1>
<table class='table table-bordered'>
<tr>
<th>主题</th>
<th>缩略图</th>
<th>内容</th>
<th>发布时间</th>
<th>状态</th>
<th>操作</th>
</tr>
<?php if(is_array($users)): $i = 0; $__LIST__ = $users;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
	<th><?php echo ($vo["title"]); ?></th>
	<th><img src="/study/Public/Uploads/photo/<?php echo ($vo["photo"]); ?>" alt="头像不存在" class="size"></th>
	<th><?php echo ($vo["content"]); ?></th>
	<th><?php echo ($vo["ntime"]); ?></th>
	<th><?php if($vo["state"] == 0): ?>禁止发布
		<?php else: ?>发布<?php endif; ?></th>
		<th>
	            <div class="btn-group">
                <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#">
                   操作
                 <span class="caret"></span>
                  </a>
	             <ul class="dropdown-menu pull-right">
                 <li><a href="updatenew?id=<?php echo ($vo["nid"]); ?>"><i class="icon-envelope"></i>修改</a></li>
                 <li><a href="delnew?id=<?php echo ($vo["nid"]); ?>"><i class="icon-edit"></i> 删除</a></li>
                 <li>
                    <?php if($vo["state"] == 0): ?><a href="setnjy?id=<?php echo ($vo["nid"]); ?>"><i class="icon-trash">发布</i></a>
                    <?php else: ?><a href="delnjy?id=<?php echo ($vo["nid"]); ?>"><i class="icon-trash">禁止发布</i></a><?php endif; ?>
                     </a></li>
 </ul>
	</th>
</tr><?php endforeach; endif; else: echo "" ;endif; ?>
</body>
</html>